package com.changgou.goods.dao;

import com.changgou.pojo.Spec;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.PathVariable;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * @Author gentleman Ma
 * @Date created in 2020/2/15
 * @description
 * @Version 1.0
 */
public interface SpecMapper extends Mapper<Spec> {

    @Select("SELECT * FROM tb_spec WHERE template_id in (SELECT template_id FROM tb_category WHERE `name` = #{categoryName})")
    List<Spec> selectByCategoryName(@Param("categoryName") String categoryName);
}
